package org.myorg.v3;

public class FFS31 extends Fc3 {
	public FFS31() {

		low = -100;
		high = 100;
		best = Double.NEGATIVE_INFINITY;
	}

	public double fc(double[] tmp) {

		double y = 0;
		
		double n = tmp.length;
		
		double t1 = Math.pow(Math.pow(10, 6), 1);
			
		y = tmp[0]*tmp[0];	
				
		for (int i = 1; i < n; i++ ) {
			y = y + Math.pow(Math.pow(10, 6), ((double)i)/(n-1))*tmp[i]*tmp[i];
		}
		
//		y = Math.sin(tmp[0]);
		
		try {
			Thread.sleep(30000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return y;
	}
}
